package com.render3d.ms3d;

import com.sun.jndi.url.iiopname.iiopnameURLContextFactory;

public class MS3DGroup {

    public byte                             flags;
    public String                           name;
    public short                            numtriangles;
    public short                            triangleIndices[];                        
    public byte                             materialIndex;
    
    public float                            coords[];
    public float                            normals[];
    public float                            texcoords[];

    public int                              coordsIndex[];
    @Override
    public Object clone() throws CloneNotSupportedException {
    	// TODO Auto-generated method stub
    	MS3DGroup group = new MS3DGroup();
    	group.flags = flags;
    	group.name = name;
    	group.numtriangles = numtriangles;
    	group.triangleIndices = triangleIndices;
    	group.materialIndex = materialIndex;
    	int size = coords.length;
    	group.coords = new float[size];
    	for(int i = 0;i < size;i++){
    		group.coords[i] = coords[i];
    	}
    	size = normals.length;
    	group.normals = new float[size];
    	for(int i = 0;i < size;i++){
    		group.normals[i] = normals[i];
    	}
    	size = texcoords.length;
    	group.texcoords = new float[size];
    	for(int i = 0;i < size;i++){
    		group.texcoords[i] = texcoords[i];
    	}
    	size = coordsIndex.length;
    	group.coordsIndex = new int[size];
    	for(int i = 0;i < size;i++){
    		group.coordsIndex[i] = coordsIndex[i];
    	}
    	return group;
    }
}
